package com.project.model;

import java.sql.SQLException;

import com.project.dto.TPeopleDto;
import com.project.ibatis.SqlDaoSuport;

public class TPeopleUserManager extends SqlDaoSuport implements ITPeopleUser {
	
	public TPeopleUserManager(){
		super();
	}
	public TPeopleUserManager(String pass){
		super(pass);
	}
	
	@Override
	public int addTpeopleUser(TPeopleDto tDto) {
		int count = 1;
		try {
			this.getSqlMapClient().insert("addTpeopleUser",tDto);
		} catch (SQLException e) {
			System.out.println(e);
			count = -1;
		}
		return count;
	}
	@Override
	public int updateTpeopleUser(TPeopleDto tDto) {
		int count = 1;
		try {
			this.getSqlMapClient().update("updateTpeopleUser", tDto);
		} catch (SQLException e) {
			System.out.println(e);
			count = -1;
		}
		return count;
	}

}
